package com.sdry.mapper.lz;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.sdry.model.lz.InventoryDetail;
import com.sdry.model.lz.InventoryOrder;
import com.sdry.model.lz.LzQueryCriteria;
import com.sdry.model.lz.Warehouse;
import com.sdry.model.zc.ZcSysUserEntity;

/**
 * 
 * @ClassName InventoryMapper
 * @Description 盘点管理 
 * @Author lz
 * @Date 2019年3月26日 14:20:06
 * @Version 1.0
 */
public interface InventoryMapper {

	Long addInventoryOrder(InventoryOrder inventoryOrder);

	Long addInventoryOrderDetail(InventoryDetail detail);
	
	Long deleteInventoryOrderById(long id);

	Long deleteInventoryOrderDetailById(long id);

	Long updateInventoryOrderById(@Param("id")String id,@Param("fieldName")String fieldName, @Param("fieldValue")String fieldValue);

	Long updateInventoryOrderDetailById(@Param("id")String id,@Param("fieldName")String fieldName, @Param("fieldValue")String fieldValue);
	
	List<InventoryOrder> queryInventoryOrderCriteria(LzQueryCriteria criteria);

	int countInventoryOrderCriteria(LzQueryCriteria criteria);
	
	List<InventoryDetail> queryInventoryDetailCriteriaById(
			LzQueryCriteria criteria);
	
	
    Long queryInventorynum(String num);
    
    List<InventoryDetail>  queryDetailByid(long  id);
	int countInventoryDetailCriteriaById(LzQueryCriteria criteria);
	
	List<InventoryOrder> queryInventoryOrderCriteriaAndroid();

	List<InventoryDetail> queryInventoryDetailCriteriaByIdAndroid(
			String order_id);
	
	Long updateInventoryDetailAndroid(InventoryDetail inventoryDetail);
	
	List<Warehouse> queryAllWarehouseAndroid();
	
	
	//ljq 查询所有盘点单
	List<InventoryOrder> queryAllInventoryOrder();
	//ljq 根据盘点单查询所有详情
	List<InventoryDetail> queryInventoryDetailByOrder(String orderId);
	//ljq 根据盘点详情单ID查询
	InventoryDetail queryInventoryDetailById(long id);
	InventoryDetail queryInventoryDetailByIdcid(@Param("mid")long mid, @Param("cid")long cid, @Param("detailid")long detailid);
	/**   
	 * 查询所有员工
	 * @Title:queryAllUser   
	 * @return             
	 */
	List<ZcSysUserEntity> queryAllUser();
}
